import { createRouter, createWebHistory } from "vue-router";

import LoginView from "@/views/login/index.vue";
import HomeView from "@/views/home/index.vue";
import ShouView from "@/views/home/home.vue";
import FenView from "@/views/home/fen.vue";
import ShopView from "@/views/home/shop.vue";
import MyView from "@/views/home/my.vue";
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    { path: "/", redirect: "/home/home" },
    {
      path: "/login",
      component: LoginView,
    },
    {
      path: "/home",
      component: HomeView,
      children: [
        {
          path: "home",
          component: ShouView,
        },
        {
          path: "fen",
          component: FenView,
        },
        {
          path: "shop",
          component: ShopView,
        },
        {
          path: "my",
          component: MyView,
        },
      ],
    },
  ],
});

export default router;
